package com.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author 
 */
public class Plainrecord implements Serializable {
    /**
     * 营养计划编号
     */
    private Integer prid;

    /**
     * 顾客编号
     */
    private String cid;

    /**
     * 营养师编号
     */
    private String did;

    /**
     * 计划开始时间
     */
    private Date begindate;

    /**
     * 计划结束时间
     */
    private Date enddate;

    /**
     * 计划总摄入热量
     */
    private Integer targetcalorie;

    /**
     * 计划总摄入蛋白质
     */
    private Integer targetsmportein;

    /**
     * 计划总摄入糖
     */
    private Integer tarsugar;

    /**
     * 卡路里目标完成结果
     */
    private Integer calorieresult;

    /**
     * 蛋白质目标完成结果
     */
    private Integer smporteinresult;

    /**
     * 糖目标完成结果
     */
    private Integer sugarresult;

    /**
     * 执行结果 完成未完成 差一点
     */
    private String plstate;

    /**
     * 顾客评价
     */
    private String cappraise;

    /**
     * 营养师评价
     */
    private String dappraise;

    private List<Explaindetailrecord> explaindetailrecords;

    private static final long serialVersionUID = 1L;

    public Integer getPrid() {
        return prid;
    }

    public void setPrid(Integer prid) {
        this.prid = prid;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getDid() {
        return did;
    }

    public void setDid(String did) {
        this.did = did;
    }

    public Date getBegindate() {
        return begindate;
    }

    public void setBegindate(Date begindate) {
        this.begindate = begindate;
    }

    public Date getEnddate() {
        return enddate;
    }

    public void setEnddate(Date enddate) {
        this.enddate = enddate;
    }

    public Integer getTargetcalorie() {
        return targetcalorie;
    }

    public void setTargetcalorie(Integer targetcalorie) {
        this.targetcalorie = targetcalorie;
    }

    public Integer getTargetsmportein() {
        return targetsmportein;
    }

    public void setTargetsmportein(Integer targetsmportein) {
        this.targetsmportein = targetsmportein;
    }

    public Integer getTarsugar() {
        return tarsugar;
    }

    public void setTarsugar(Integer tarsugar) {
        this.tarsugar = tarsugar;
    }

    public Integer getCalorieresult() {
        return calorieresult;
    }

    public void setCalorieresult(Integer calorieresult) {
        this.calorieresult = calorieresult;
    }

    public Integer getSmporteinresult() {
        return smporteinresult;
    }

    public void setSmporteinresult(Integer smporteinresult) {
        this.smporteinresult = smporteinresult;
    }

    public Integer getSugarresult() {
        return sugarresult;
    }

    public void setSugarresult(Integer sugarresult) {
        this.sugarresult = sugarresult;
    }

    public String getPlstate() {
        return plstate;
    }

    public void setPlstate(String plstate) {
        this.plstate = plstate;
    }

    public String getCappraise() {
        return cappraise;
    }

    public void setCappraise(String cappraise) {
        this.cappraise = cappraise;
    }

    public String getDappraise() {
        return dappraise;
    }

    public void setDappraise(String dappraise) {
        this.dappraise = dappraise;
    }

    public List<Explaindetailrecord> getExplaindetailrecords() {
        return explaindetailrecords;
    }

    public void setExplaindetailrecords(List<Explaindetailrecord> explaindetailrecords) {
        this.explaindetailrecords = explaindetailrecords;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Plainrecord other = (Plainrecord) that;
        return (this.getPrid() == null ? other.getPrid() == null : this.getPrid().equals(other.getPrid()))
            && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid()))
            && (this.getBegindate() == null ? other.getBegindate() == null : this.getBegindate().equals(other.getBegindate()))
            && (this.getEnddate() == null ? other.getEnddate() == null : this.getEnddate().equals(other.getEnddate()))
            && (this.getTargetcalorie() == null ? other.getTargetcalorie() == null : this.getTargetcalorie().equals(other.getTargetcalorie()))
            && (this.getTargetsmportein() == null ? other.getTargetsmportein() == null : this.getTargetsmportein().equals(other.getTargetsmportein()))
            && (this.getTarsugar() == null ? other.getTarsugar() == null : this.getTarsugar().equals(other.getTarsugar()))
            && (this.getCalorieresult() == null ? other.getCalorieresult() == null : this.getCalorieresult().equals(other.getCalorieresult()))
            && (this.getSmporteinresult() == null ? other.getSmporteinresult() == null : this.getSmporteinresult().equals(other.getSmporteinresult()))
            && (this.getSugarresult() == null ? other.getSugarresult() == null : this.getSugarresult().equals(other.getSugarresult()))
            && (this.getPlstate() == null ? other.getPlstate() == null : this.getPlstate().equals(other.getPlstate()))
            && (this.getCappraise() == null ? other.getCappraise() == null : this.getCappraise().equals(other.getCappraise()))
            && (this.getDappraise() == null ? other.getDappraise() == null : this.getDappraise().equals(other.getDappraise()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPrid() == null) ? 0 : getPrid().hashCode());
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode());
        result = prime * result + ((getBegindate() == null) ? 0 : getBegindate().hashCode());
        result = prime * result + ((getEnddate() == null) ? 0 : getEnddate().hashCode());
        result = prime * result + ((getTargetcalorie() == null) ? 0 : getTargetcalorie().hashCode());
        result = prime * result + ((getTargetsmportein() == null) ? 0 : getTargetsmportein().hashCode());
        result = prime * result + ((getTarsugar() == null) ? 0 : getTarsugar().hashCode());
        result = prime * result + ((getCalorieresult() == null) ? 0 : getCalorieresult().hashCode());
        result = prime * result + ((getSmporteinresult() == null) ? 0 : getSmporteinresult().hashCode());
        result = prime * result + ((getSugarresult() == null) ? 0 : getSugarresult().hashCode());
        result = prime * result + ((getPlstate() == null) ? 0 : getPlstate().hashCode());
        result = prime * result + ((getCappraise() == null) ? 0 : getCappraise().hashCode());
        result = prime * result + ((getDappraise() == null) ? 0 : getDappraise().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", prid=").append(prid);
        sb.append(", cid=").append(cid);
        sb.append(", did=").append(did);
        sb.append(", begindate=").append(begindate);
        sb.append(", enddate=").append(enddate);
        sb.append(", targetcalorie=").append(targetcalorie);
        sb.append(", targetsmportein=").append(targetsmportein);
        sb.append(", tarsugar=").append(tarsugar);
        sb.append(", calorieresult=").append(calorieresult);
        sb.append(", smporteinresult=").append(smporteinresult);
        sb.append(", sugarresult=").append(sugarresult);
        sb.append(", plstate=").append(plstate);
        sb.append(", cappraise=").append(cappraise);
        sb.append(", dappraise=").append(dappraise);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}